package gamesys.games.particlesystem.core {
	import gamesys.games.particlesystem.AbstractTest;

	import particlesystem.core.ParticleCanvas;
	import particlesystem.graphics.BitmapAnimation;
	import particlesystem.graphics.BitmapAnimationFactory;

	/**
	 * @author robertthurston
	 */
	public class ParticleCanvasTest extends AbstractTest {

		private var particleCanvas : ParticleCanvas;
		private var bitmapAnimation : BitmapAnimation;
		private var bitmapAnimationFactory : BitmapAnimationFactory;
		private var animation : Array;

		override protected function init() : void {
			bitmapAnimationFactory = new BitmapAnimationFactory();
			animation = bitmapAnimationFactory.getBitmapAnimation("Coin"); 
			bitmapAnimation = new BitmapAnimation(animation);
			
			particleCanvas = new ParticleCanvas(100, 100);
			particleCanvas.draw(bitmapAnimation.getNextFrame(), 10, 10);
			particleCanvas.draw(bitmapAnimation.getNextFrame(), 30, 30);
			
			addChild(particleCanvas);
		}
	}
}
